package com.szjk.app.controller;

import com.szjk.app.service.UserWebService;
import com.szjk.core.utils.IdWorkUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author chenxinglin
 * @version 1.0
 * @description
 * @date 2021-11-24 11:45
 * @company szjk
 */
@RestController
@RequestMapping("/app/user")
public class UserController {

    @Autowired
    private UserWebService webService;

    @GetMapping("/getInfo/{id}")
    private String getInfo(@PathVariable String id){
        String coreId = IdWorkUtils.getId();
        return "hello, this is app‘s " + id + " & coreId= "  + coreId;
    }

    @GetMapping("/getWebInfo/{id}")
    private String getWebInfo(@PathVariable String id){
        return webService.getWebUser(id);
    }

}
